home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Full / Paragon Drive Backup 9 / DB90_SE_x64.msi / Data1.cab / _9AD99B83B5654044A08F3256966A042B < prev    next >
Extensible Markup Language  |  2008-06-28  |  5KB  |  163 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <xsl:stylesheet
  4.   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.   xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  6.   version="1.0">
  7.  
  8. <xsl:output
  9.   method="html"
  10.   version="4.0"
  11.   encoding="UTF-8"
  12.   omit-xml-declaration="yes"
  13.   indent="yes"/>
  14.  
  15. <xsl:variable name="hexchars" select="'0123456789ABCDEF'"/>
  16.  
  17. <xsl:template name="convert-to-hex">
  18.     <xsl:param name="number"/>
  19.     <xsl:param name="result"/>
  20.     <xsl:variable name="to-base-digit" select="substring($hexchars,$number mod 16 + 1,1)"/>
  21.     <xsl:choose>
  22.         <xsl:when test="$number >= 16">
  23.             <xsl:call-template name="convert-to-hex">
  24.                 <xsl:with-param name="number" select="floor($number div 16)"/>
  25.                 <xsl:with-param name="result" select="concat($to-base-digit,$result)"/>
  26.             </xsl:call-template>
  27.         </xsl:when>
  28.         <xsl:otherwise>
  29.             <xsl:value-of select="concat($to-base-digit,$result)"/>
  30.         </xsl:otherwise>
  31.     </xsl:choose>
  32. </xsl:template>
  33.  
  34.  
  35. <xsl:template match="/Root">
  36.  
  37. <html>
  38.   <table>
  39.  
  40.     <tr>
  41.       <!-- Object header -->
  42.       <td colspan="2">
  43.         <h2><xsl:value-of select="PropertyBag/Property[@name='PROPID_DISPLAYNAME']"/></h2>
  44.         <img src="hline_gray"/>
  45.       </td>
  46.     </tr>
  47.     <tr>
  48.       <td align="right">
  49.         <nobr><b><xsl:value-of select="PropertyList/Property[@propname='PROPID_HDM_SIZESTRING']"/></b></nobr>
  50.       </td>
  51.       <td width="100%">
  52.         <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_SIZESTRING']"/></nobr>
  53.       </td>
  54.     </tr>
  55.     <tr>
  56.       <TD>
  57.       </TD>
  58.       <TD align="left">
  59.         <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_SIZESTRING_LONG']"/></nobr>
  60.       </TD>
  61.     </tr>
  62.     <tr>
  63.       <TD>
  64.       </TD>
  65.       <TD align="left">
  66.         <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_SIZEINSECTORS_STRING']"/></nobr>
  67.       </TD>
  68.     </tr>
  69.  
  70.     <tr>
  71.       <td align="right">
  72.         <nobr><b><xsl:value-of select="PropertyList/Property[@propname='PROPID_HDM_HDDSIZE_STRING']"/></b></nobr>
  73.       </td>
  74.       <td width="100%">
  75.         <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_HDDSIZE_STRING']"/></nobr>
  76.       </td>
  77.     </tr>
  78.     <tr>
  79.       <TD>
  80.       </TD>
  81.       <TD align="left">
  82.         <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_HDDSIZE_STRINGLONG']"/></nobr>
  83.       </TD>
  84.     </tr>
  85.     <tr>
  86.       <TD>
  87.       </TD>
  88.       <TD align="left">
  89.         <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_HDDSIZESECTORS_STRING']"/></nobr>
  90.       </TD>
  91.     </tr>
  92.  
  93.     <tr>
  94.       <td align="right">
  95.         <nobr><b><xsl:value-of select="PropertyList/Property[@propname='PROPID_HDM_CYLINDERS']"/></b></nobr>
  96.       </td>
  97.       <td>
  98.         <xsl:variable name="CylDes" select="PropertyBag/Property[@name='PROPID_HDM_CYLINDERS']"/>
  99.         <xsl:variable name="CylHex">
  100.           <xsl:call-template name="convert-to-hex">
  101.             <xsl:with-param name="number" select="$CylDes"/>
  102.           </xsl:call-template>
  103.         </xsl:variable>
  104.         <nobr>0x<xsl:value-of select="$CylHex"/><nobr>
  105.         <nobr>(<xsl:value-of select="$CylDes"/>)</nobr>
  106.       </td>
  107.     </tr>
  108.     <tr>
  109.       <td align="right">
  110.         <nobr><b><xsl:value-of select="PropertyList/Property[@propname='PROPID_HDM_HEADS']"/></b></nobr>
  111.       </td>
  112.       <td>
  113.         <xsl:variable name="HeadsDes" select="PropertyBag/Property[@name='PROPID_HDM_HEADS']"/>
  114.         <xsl:variable name="HeadsHex">
  115.           <xsl:call-template name="convert-to-hex">
  116.             <xsl:with-param name="number" select="$HeadsDes"/>
  117.           </xsl:call-template>
  118.         </xsl:variable>
  119.         <nobr>0x<xsl:value-of select="$HeadsHex"/><nobr>
  120.         <nobr>(<xsl:value-of select="$HeadsDes"/>)</nobr>
  121.       </td>
  122.     </tr>
  123.     <tr>
  124.       <td align="right">
  125.         <nobr><b><xsl:value-of select="PropertyList/Property[@propname='PROPID_HDM_SECTORSPERTRACK']"/></b></nobr>
  126.       </td>
  127.       <td>
  128.         <xsl:variable name="SectorsDes" select="PropertyBag/Property[@name='PROPID_HDM_SECTORSPERTRACK']"/>
  129.         <xsl:variable name="SectorsHex">
  130.           <xsl:call-template name="convert-to-hex">
  131.             <xsl:with-param name="number" select="$SectorsDes"/>
  132.           </xsl:call-template>
  133.         </xsl:variable>
  134.         <nobr>0x<xsl:value-of select="$SectorsHex"/><nobr>
  135.         <nobr>(<xsl:value-of select="$SectorsDes"/>)</nobr>
  136.       </td>
  137.     </tr>
  138.     <tr>
  139.       <TD align="right">
  140.         <nobr><b><xsl:value-of select="PropertyList/Property[@propname='PROPID_HDM_HDDSECTORSIZE_STRING']"/></b></nobr>
  141.       </TD>
  142.       <TD align="left">
  143.         <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_HDDSECTORSIZE_STRING']"/></nobr>
  144.       </TD>
  145.     </tr>
  146. <!--    
  147.     <tr>
  148.       <td colspan="2">
  149.         <img src="hline_gray"/>
  150.       </td>
  151.     </tr>
  152.     <tr>
  153.       <td colspan="2" align="center">
  154.         <img src="C2CAA428-F14A-48d2-93D9-AA7580338E78"/>
  155.       </td>
  156.     </tr>
  157. -->
  158.   </table>
  159.  
  160. </xsl:template>
  161. </xsl:stylesheet>
  162.  
  163.